import base64
import xxtea

def svid_acg_new(text):
    key = "PZW2agjMSUIDs"
    text2 = text.replace('~', '+').replace('*', '+').replace('-', '/').replace('_', '=')
    text2 = base64.b64decode(text2)
    svid_decrypt_data = xxtea.decrypt(text2, key)
    return svid_decrypt_data


def smid_acg_new(text):
    key = "PZW2agjMSMID"
    text2 = text.replace('~', '+').replace('*', '+').replace('-', '/').replace('_', '=')
    text2 = base64.b64decode(text2)
    smid_decrypt_data = xxtea.decrypt(text2, key)
    return smid_decrypt_data


def stid_acg_new(text):
    key = "PZW2agjMSUID"
    text3 = text.replace('~', '+').replace('*', '+').replace('-', '/').replace('_', '=')
    text3 = base64.b64decode(text3)
    bar_decrypt_data = xxtea.decrypt(text3, key)
    return bar_decrypt_data


def suid_acg_new(text):
    key = "PZW2agjMSUID"
    text3 = text.replace('~', '+').replace('*', '+').replace('-', '/').replace('_', '=')
    text3 = base64.b64decode(text3)
    suid_decrypt_data = xxtea.decrypt(text3, key)
    return suid_decrypt_data


def scmt_id_new(text):
    key = "PZW2agjMSUID"
    text3 = text.replace('~', '+').replace('*', '+').replace('-', '/').replace('_', '=')
    text3 = base64.b64decode(text3)
    scmt_decrypt_data = xxtea.decrypt(text3, key)
    return scmt_decrypt_data


def stid(text):
    key = "PZW2agjMSUID"
    text3 = text.replace('+', '~').replace('+', '*').replace('/', '-').replace('=', '_')
    bar_id = xxtea.encrypt(text3, key)
    text3 = base64.b64encode(bar_id)
    print(text3)
    return bar_id



if __name__ == '__main__':
    print(stid_acg_new('grnYD5id~ZY_'))